<?php


namespace app\api\controller;


class Memder
{
public $memberId;
public $memderData;
public function __construct()
{
    $token = input('get.token');
    if (empty($token)) output_error('请登录~');
    $tokenData = MemderToken::where('token_content', '=',$token)->find();
    if (empty($tokenData)) output_error('请登录~');
    if ($tokenData['end_time'] < time() )output_errer('请登录~');
    if ($tokenData['token_state'] =='2') output_errer('请登录~');
    $this->memberId = $tokenData['member_id'];
    $this->memderData = MemderModel::where('member_id', '=', $this->memberId)->find();
    output_data($this->memderData);

}
}